<?php
   // include function files for this application
   require_once('/home/domains/uny-con.com/public_html/uny-con_fns.php');
   // start session which may be needed later
   // start it now because it must go before headers
   if (!session_id()) { session_start(); }

if (check_valid_user() && $_SESSION['admin'] == 't') {
// We will redirect them to the attendee_home page because they are already logged in.
	header("Location: ".$conf['base_path']."registration/admin_home.php"); 
	exit;
}

if (check_valid_user()) {
// We will redirect them to the attendee_home page because they are already logged in.
	header("Location: ".$conf['base_path']."registration/attendee_home.php"); 
	exit;
}
else {
do_html_header('Login to UNY-Con event registration system', staysmall, $uny);

display_login_form();

do_html_footer(news);
}
?>